home *** CD-ROM | disk | FTP | other *** search
- ;-------------------------fpindigt routine begins--------------------------+
- ; from BLUEBOOK OF ASSEMBLY ROUTINES FOR IBM PC & XT.
- ; page : 83
- ;
- ; NAME FPINDIGT
- ; ROUTINE FOR SINGLE DECIMAL DIGIT TO FLOATING POINT
- ;
- ; FUNCTION: This routine places a single decimal digit in temporary
- ; binary floating point format.
- ;
- ; INPUT: Upon entry AL contains the value of the digit
- ;
- ; OUTPUT: Upon entry and exit the address of the temporary binary floating
- ; point result is in DI.
- ;
- ; REGISTERS USED: AL,CX and DI are modified.
- ;
- ; SEGMENTS REFERENCED: Upon entry the data segment contains storage for
- ; the temporary binary floating point number.
- ;
- ; ROUTINES CALLED: None
- ; SPECIAL NOTES: This is a NEAR procedure needed by FPIN.
- ;
- ; ROUTINE TO PLACE DIGIT IN TEMP FLOATING POINT
- ;
- fpindigt proc near
- ;
- ; clear the number first
- push di ; save pointer
- push ax ; save digit
- mov al,0 ; zero byte
- mov cx,13 ; do 13 bytes
- ;
- fpindigt1:
- mov [di],al ; clear the byte
- inc di ; point to next byte
- loop fpindigt1 ; loop for more
- pop ax ; restore digit
- pop di ; restore pointer
- ;
- ; move the digit into place
- mov [di+9],al ; place the digit
- ;
- ret ; out of subr return
- ;
- fpindigt endp
- ;-------------------------fpindigt routine ends---------------------------+